package com.yintw.controller;

import com.alibaba.fastjson.JSONObject;
import com.yintw.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private TestService testService;

    @RequestMapping("test")
    public JSONObject index() {
        JSONObject jsonObject =new JSONObject();
        jsonObject.put("name","yintw");
        jsonObject.put("age",18);
        jsonObject.put("id",1);
        return testService.getObj(jsonObject);
    }
}
